package com.qdaily.ui.net.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created with IntelliJ IDEA.
 * User: Felix
 * Date: 4/29/15
 * Time: 15:34
 * QQ:74104
 * Email:lovejiuwei@gmail.com
 */
public class SendCommentFeeds implements Parcelable {
    private int id = 0;
    private String content = "";
    private int publish_time = 0;
    private int comment_count = 0;
    private int praise_count = 0;
    private CommentMeta comment = new CommentMeta();

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getPublish_time() {
        return publish_time;
    }

    public void setPublish_time(int publish_time) {
        this.publish_time = publish_time;
    }

    public int getComment_count() {
        return comment_count;
    }

    public void setComment_count(int comment_count) {
        this.comment_count = comment_count;
    }

    public int getPraise_count() {
        return praise_count;
    }

    public void setPraise_count(int praise_count) {
        this.praise_count = praise_count;
    }

    public CommentMeta getComment() {
        return comment;
    }

    public void setComment(CommentMeta comment) {
        this.comment = comment;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.content);
        dest.writeInt(this.publish_time);
        dest.writeInt(this.comment_count);
        dest.writeInt(this.praise_count);
        dest.writeParcelable(this.comment, 0);
    }

    public SendCommentFeeds() {
    }

    private SendCommentFeeds(Parcel in) {
        this.id = in.readInt();
        this.content = in.readString();
        this.publish_time = in.readInt();
        this.comment_count = in.readInt();
        this.praise_count = in.readInt();
        this.comment = in.readParcelable(AuthorFeed.class.getClassLoader());
    }

    public static final Parcelable.Creator<SendCommentFeeds> CREATOR = new Parcelable.Creator<SendCommentFeeds>() {
        public SendCommentFeeds createFromParcel(Parcel source) {
            return new SendCommentFeeds(source);
        }

        public SendCommentFeeds[] newArray(int size) {
            return new SendCommentFeeds[size];
        }
    };

    @Override
    public String toString() {
        return "SendCommentFeeds{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", publish_time=" + publish_time +
                ", comment_count=" + comment_count +
                ", praise_count=" + praise_count +
                ", author=" + comment +
                '}';
    }
}
